package com.tourism.home.controller.system;import com.tourism.home.entity.Result;import com.tourism.home.service.RoleService;import com.tourism.home.utils.ResultUtil;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.web.bind.annotation.*;/** * @author wanglinli * at 18-4-10 下午9:22 * 注释:角色控制器(public方法是要权限验证的) */@RestControllerpublic class RoleController {    @Autowired    private RoleService roleService;    @GetMapping(value = "user/role/{id}")    public Result getRoleByUID(@PathVariable(value = "id") Integer id) {        Object object = roleService.getRoleByUID(id);        if(object != null){            return ResultUtil.success(object);        }else{            return ResultUtil.error(null);        }    }}